package com.mcy.business.fallback.factory;

import com.mcy.business.fallback.BootClientFallBack;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * springCloudAlibaba官方推荐用法
 * 配置fallback异常处理
 */
@Component
public class BootClientFallBackFactory  implements FallbackFactory<BootClientFallBack> {
    @Override
    public BootClientFallBack create(Throwable throwable) {
        return new BootClientFallBack(throwable);
    }
}
